import 'package:base_plugin/base_plugin.dart';
import 'package:finance_app/generated/a.dart';
import 'package:finance_app/src/common/app_colors.dart';
import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart';

mixin CheckBoxMixin {
  bool get isSelect;

  bool get isEnable;

  Widget get buildSelectWidget => IndexedStack(
        children: [
          SvgPicture.asset(
            isEnable
                ? A.assetsImagesStyleSelectCheckBox
                : A.assetsImagesStyleSeleckCheckBoxGray,
            width: getDp(22),
            height: getDp(22),
            fit: BoxFit.contain,
          ),
          SvgPicture.asset(
            A.assetsImagesStyleUnSelectCheckBox,
            width: getDp(22),
            height: getDp(22),
            color: isEnable ? null : aceGrayColor,
            fit: BoxFit.contain,
          ),
        ],
        index: isSelect == true ? 0 : 1,
      );
}
